package com.nmsl.service;

import com.nmsl.domain.TyDepartment;
import com.nmsl.mapper.DepartmentsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentsService {
    @Autowired
    private DepartmentsMapper departmentsMapper;

    public List<TyDepartment> selectAllParentDepartments(){
        return departmentsMapper.selectAllParentDepartments();
    }
    public List<TyDepartment> selectAllChildDepartments(Long id){
        return departmentsMapper.selectAllChildDepartments(id);
    }
    public List<TyDepartment> getAllChildDepartments(){
        return departmentsMapper.getAllChildDepartments();
    }
}
